{include file='../../../PublicView/include.html'}
<link href="http://g.tbcdn.cn/kissy/k/1.3.2/??calendar/assets/dpl-min.css" rel="stylesheet">
<script src="/assets/shopmodule/event_step2.js"></script>
<div class="taeapp admin-table" cellpadding="0" cellspacing="0" border="0">
        <div class="taeapp admin-table-side  tips tips-small tips-notice tips-no-icon">
            <!--菜单部分-->
            <div class="taeapp admin-nav">
			{include file='../../../PublicView/shopleft.html'}
			</div>
            <!--菜单部分-->
        </div>
        <div class="taeapp admin-table-main">
            <!--内容部分-->
				<ul class="breadcrumb">
				<li><a href="/">互动到店</a> <span class="divider">/</span></li>
				<li>游戏管理 <span class="divider">/</span></li>
				<li class="active">{$title}</li></li>
				</ul>
		
			<!--内容部分-->
			<div class="button-group" style="margin: 9px 0;">
			  <a class="button" href="/?c=jifen&amp;m=shopadmin">积分配置</a>
			  <a class="button" href="/?c=jifen&a=user&m=shopadmin">兑换记录</a>
			  <a class="button" href="/?c=jifen&a=qiandao&m=shopadmin">签到记录</a>
			  <a class="button" href="/?c=jifen&a=jforders&m=shopadmin">订单换积分</a>
			</div>
			{include file='../../../PublicView/showmessage.html'}
			<div class="row">
			  <div class="panel">
			  <div class="panel-header">
				<h3>游戏设置</h3>
			  </div>
			  <div class="panel-body clearfix">
				<form method="post" action="/?a=jifen_save&c=jifen&m=shopadmin">
					<div class="form-horizontal">
						<div class="row">
							
							<div class="control-group span20">
								<label class="control-label">每天签到积分：</label>
								<div class="controls control-row-auto span14 span-width">
									<div class="well well-small">
										<div class="row control-row1">
											<span class="auxiliary-text offset1">
                            请填写积分奖励设置。用户每天签到，每天获取积分，连续签到获得积分更多。
											</span>
										</div>
											<div class="control-group">
												<label class="control-label"><span class="label label-warning">开关</span>：</label>
												<div class="controls">
													<select class="input-small onoff" data-input="jifen" name="onoff">
													<option value="0" {if $cfg.onoff==0}selected="selected"{/if}>关闭</option>
													<option value="1" {if $cfg.onoff==1}selected="selected"{/if}>打开</option>
													</select>积分功能总开关<i class=""></i>
												</div>
												<span class="x-icon x-icon-mini x-icon-info helper" data-tip="积分设置总开关，只有该选项开启后以下设置才生效">?</span>
											</div>
											<div class="control-group">
												<label class="control-label">连续签到：</label>
												<div class="controls">
													第一天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[0]|default:10}" value="{$cfg.day[0]|default:10}">分
													第二天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[1]|default:20}" value="{$cfg.day[1]|default:20}">分
													第三天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[2]|default:40}" value="{$cfg.day[2]|default:40}">分
												</div>
											</div>
											<div class="control-group">
												<label class="control-label">连续签到：</label>
												<div class="controls">
													第四天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[3]|default:80}" value="{$cfg.day[3]|default:80}">分
													第五天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[4]|default:100}" value="{$cfg.day[4]|default:100}">分
												</div>
											</div><div class="control-group">
												<label class="control-label">连续签到：</label>
												<div class="controls">
													以后每天<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="day[]"  data-val="{$cfg.day[5]|default:100}" value="{$cfg.day[5]|default:100}">分
												</div>
											</div>
											<div class="row control-row1">
												<span class="auxiliary-text offset1">
													补签积分另算。如果用户漏签，不论是否补签，连续积分都从第一天计算。
												</span>
											</div>
											<div class="control-group">
												<label class="control-label "><span class="label label-info">补签</span>：</label>
												<div class="controls">
													允许<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="buqian"  data-val="{$cfg.buqian|default:3}" value="{$cfg.buqian|default:3}">天内补签
													，每次补签可得<input type="text" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if} class="span2 span-width control-text form jifen" name="buqianjifen"  data-val="{$cfg.buqianjifen|default:1}" value="{$cfg.buqianjifen|default:1}">积分
												</div>
												<span class="x-icon x-icon-mini x-icon-info helper" data-tip="日常签到时，获得签到指定积分、同时获得指定的积分加成。补签时，如果不允许获得加成，则仅获得指定的补签积分。">?</span>
											</div>
											<div class="control-group">
												<label class="control-label"> 补签加成：</label>
												<div class="controls">
													<select class="input-small form jifen" {if $cfg.onoff==0}readonly="readonly" style="background:#DDD"{/if}  name="buqianjiac">
													<option value="0" {if $cfg.buqianjiac==0}selected="selected"{/if}>-不加成-</option>
													<option value="1" {if $cfg.buqianjiac==1}selected="selected"{/if}>+加成+</option>
													</select>补签可不获得加成。受加成设置影响<i class=""></i>
												<span class="x-icon x-icon-mini x-icon-info helper" data-tip="日常签到时，获得签到指定积分、同时获得指定的积分加成。补签时，如果不允许获得加成，则仅获得指定的补签积分。按照满足已设置的加成条件计算">?</span>
												</div>
											</div>
									</div>
								</div>
							</div>
							<div class="control-group span20">
							<label class="control-label">签到加成：</label>
								<div class="controls control-row-auto span14 span-width">
									<div class="well well-small">
										<div class="row control-row1">
											<span class="auxiliary-text offset1 tips tips-small tips-info">
												买家兑换积分的订单号购物总额达到指定金额，每天签到增加的分数。
											</span>
										</div>
										<div class="row control-row1">
											<span class="auxiliary-text offset1 tips tips-small tips-warning">
												注意！本功能必须配合订单号兑换积分一同使用。
											</span>
											　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="用户通过订单号兑换积分，累计订单金额达到指定金额，每天签到都额外奖励的积分数量。如果不开启订单号兑换积分，就不能累计到用户购买的总金额。可以设置订单满1元兑换1积分这样的设置来完成订单金额的累计。">?</span>
										</div>
										<div class="control-group">
											<label class="control-label"><span class="label label-warning">开关</span>：</label>
											<div class="controls">
												<select class="input-small onoff" data-input="jcset" name="onoff_qdjc">
												<option value="0" {if $cfg.onoff_qdjc==0}selected="selected"{/if}>关闭</option>
												<option value="1" {if $cfg.onoff_qdjc==1}selected="selected"{/if}>打开</option>
												</select>加成总开关<i class=""></i>
											</div>
											<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可获得签到加成">?</span>
										</div>
										{foreach from=$cfg.jc item=jcset key=jckey name=jiacheng}
											<div class="control-group {if $smarty.foreach.jiacheng.last}div-jiacheng{else}div-jiacheng-{$jckey}{/if} ">
												<label class="control-label">兑换订单额满：</label>
												<div class="controls">
													<input type="text" {if $cfg.onoff_qdjc==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width jcset" value="{$jcset.jine|default:'0'}" name="jcje[]">
													元，每次签到加
													<input type="text" {if $cfg.onoff_qdjc==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width jcset" value="{$jcset.jifen|default:'0'}" name="jcjf[]">
													积分<i class=""></i>
													{if $smarty.foreach.jiacheng.last}
														<button class="button button-mini button-success js-jiacheng" type="button" data-target="jiacheng"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
														{else}
														<button class="button button-mini button-danger js-jiacheng" type="button" data-target="jiacheng"  data-addid="{$jckey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="每达到累计订单金额，获得的签到加分。必须配合订单兑换积分使用。">?</span>
											</div>
										{/foreach}
									</div>
								</div>
							</div>
							<div class="control-group span20">
							<label class="control-label">订单号兑换积分：</label>
								<div class="controls control-row-auto span14 span-width">
									<div class="well well-small">
										<div class="row control-row1">
											<span class="auxiliary-text offset1 tips tips-small tips-info">
												按照满足最高单金额的一条计算。不累计、不翻倍。仅确认收货的订单可以兑换。
											</span>
											　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="此处的设置按照满足最高订单金额的一条计算。例如：同时设置满1元兑换2分，和满100元兑换10分，则1~99元订单可得2分，100元订单可得10分。不要设置1元200分，100元10分这样的参数，否则满100元订单只能获得10分，1~99元反而能获得200分。">?</span>
										</div>
										<div class="control-group">
											<label class="control-label"><span class="label label-warning">开关</span>：</label>
											<div class="controls">
												<select class="input-small onoff" data-input="dddhjfset"  name="onoff_dddhjf">
												<option value="0" {if $cfg.onoff_dddhjf==0}selected="selected"{/if}>关闭</option>
												<option value="1" {if $cfg.onoff_dddhjf==1}selected="selected"{/if}>打开</option>
												</select>订单兑换积分总开关<i class=""></i>
											</div>
											<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可以订单号兑换积分">?</span>
										</div>
										{foreach from=$cfg.dddhjf item=dddhjfset key=dddhjfkey name=dddhjf}
											<div class="control-group {if $smarty.foreach.dddhjf.last}div-dingdanjifen{else}div-dingdanjifen-{$jckey}{/if}">
												<label class="control-label">单笔订单满：</label>
												<div class="controls">
													<input type="text" {if $cfg.onoff_dddhjf==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width dddhjfset" value="{$dddhjfset.ddje|default:'0'}" name="ddje[]">
													元，可兑换
													<input type="text" {if $cfg.onoff_dddhjf==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width dddhjfset" value="{$dddhjfset.dhjf|default:'0'}" name="dhjf[]">
													积分<i class=""></i>
													{if $smarty.foreach.dddhjf.last}
														<button class="button button-mini button-success js-dingdanjifen" type="button" data-target="dingdanjifen"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
														{else}
														<button class="button button-mini button-danger js-dingdanjifen" type="button" data-target="dingdanjifen"  data-addid="{$jckey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="每达到累计消费金额，获得的签到加分">?</span>
											</div>
										{/foreach}
									</div>
								</div>
							</div>
							<div class="control-group span20">
							<label class="control-label">积分兑换奖品：</label>
								<div class="controls control-row-auto span14 span-width">
									<div class="well well-small">
									<div class="row control-row1">
											<span class="auxiliary-text offset1 ">
												除实物奖外均自动发奖。先<a href="/?c=gifts&m=shopadmin">设置奖品</a>，再设置兑换。
											</span>
										</div>
										<div class="control-group">
											<label class="control-label"><span class="label label-warning">开关</span>：</label>
											<div class="controls">
												<select class="input-small onoff" data-input="dhset" name="onoff_jfdh">
												<option value="0" {if $cfg.onoff_jfdh==0}selected="selected"{/if}>关闭</option>
												<option value="1" {if $cfg.onoff_jfdh==1}selected="selected"{/if}>打开</option>
												</select>积分兑换总开关<i class=""></i>
											</div>
											<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可用积分兑换奖品">?</span>
										</div>
										{foreach from=$cfg.dh item=dhset key=dhkey name=name}
											<div class="control-group {if $smarty.foreach.name.last}div-duihuan{else}div-duihuan-{$dhkey}{/if} ">
												<label class="control-label">兑换奖品：</label>
												<div class="controls">
													<input type="text" {if $cfg.onoff_jfdh==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width dhset" value="{$dhset.jifen|default:0}" name="duihuan[]" data-post="duihuan" data-val="{$cfg.duihuan|default:'0'}">
													分兑换<i class=""></i>
													<select class="input-small form dhset" {if $cfg.onoff_jfdh==0}readonly="readonly" style="background:#DDD"{/if} name="gift[]">
													<option value="0">不兑换</option>
													{foreach from=$gifts item=item key=key}
													<option value="{$item.id}" {if $item.id==$dhset.gift}selected="selected"{/if}>{$item.name}</option>
													{/foreach}
													</select>
													奖品<i class=""></i>
													{if $smarty.foreach.name.last}
													<button class="button button-mini button-success js-duihuan" data-target="duihuan" type="button"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
													{else}
													<button class="button button-mini button-danger js-duihuan" data-target="duihuan" type="button"  data-addid="{$dhkey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="用户用积分兑换奖品的设置。">?</span>
											</div>
										{/foreach}
									</div>
								</div>
							</div>
							<div class="control-group span20">
							<label class="control-label">签到兑换奖品：</label>
								<div class="controls control-row-auto span14 span-width">
									<div class="well well-small">
									<div class="row control-row1">
											<span class="auxiliary-text offset1 ">
												除实物奖外均自动发奖。先<a href="/?c=gifts&m=shopadmin">设置奖品</a>，再设置兑换。
											</span>
									</div>
									<div class="row control-row1  ">
											<span class="auxiliary-text offset1 tips tips-small tips-info">
												仅计算当月！每个月1号重新计算。最长有效连续签到31天。
											</span>
											　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="每个月都重复赠送满足连续签到天数的奖品">?</span>
									</div>
									<div class="control-group">
										<label class="control-label"><span class="label label-warning">开关</span>：</label>
										<div class="controls">
											<select class="input-small onoff" data-input="qddhset" name="onoff_qddh">
											<option value="0" {if $cfg.onoff_qddh==0}selected="selected"{/if}>关闭</option>
											<option value="1" {if $cfg.onoff_qddh==1}selected="selected"{/if}>打开</option>
											</select>签到兑换总开关<i class=""></i>
										</div>
										<span class="x-icon x-icon-mini x-icon-info helper" data-tip="开启后才可签到兑换">?</span>
									</div>
									{foreach from=$cfg.qddh item=qddhset key=qddhkey name=qddh}
											<div class="control-group {if $smarty.foreach.qddh.last}div-qddh{else}div-qddh-{$qddhkey}{/if}">
												<label class="control-label">签到拿奖品：</label>
												<div class="controls">
													连续签<input type="text" {if $cfg.onoff_qddh==0}readonly="readonly" style="background:#DDD"{/if} class="control-text span2 span-width qddhset" value="{$qddhset.tian|default:'0'}" name="tian[]">
													天兑换<i class=""></i>
													<select class="input-small form qddhset" {if $cfg.onoff_qddh==0}readonly="readonly" style="background:#DDD"{/if} name="qddhgift[]">
													<option value="0">不兑换</option>
													{foreach from=$gifts item=item key=key}
													<option value="{$item.id}" {if $item.id==$qddhset.gift}selected="selected"{/if}>{$item.name}</option>
													{/foreach}
													</select>奖品<i class=""></i>
													{if $smarty.foreach.qddh.last}
														<button class="button button-mini button-success js-qddh" data-target="qddh" type="button"  data-addid="add"><i class="icon icon-white icon-plus"></i><span>增加</span></button>
														{else}
														<button class="button button-mini button-danger js-qddh" data-target="qddh" type="button"  data-addid="{$qddhkey}"><i class="icon icon-white icon-minus"></i><span>删除</span></button>
													{/if}
												</div>
												　<span class="x-icon x-icon-mini x-icon-info helper" data-tip="满足连续签到条件可领取的奖品。每个设置只能领取一次。">?</span>
											</div>
									{/foreach}
									</div>
								</div>
							</div>
							
						</div>
					</div>
					<div class="control-group span20 centered res">
					<button class="button save" type="submmit" >完成</button>
					</div>
					</form>
			  </div>
			</div>
			</div>			
			<input type="hidden" class="type" value="{$type|default:0}" />
        <!--内容部分-->
        </div>
</div>